package com.cy.device.rpc;


import com.cy.device.rpc.model.DeviceWithProperty;
import com.cy.swpc.common.domain.common.ServiceId;
import com.cy.swpc.common.domain.model.ResultBean;
import com.cy.swpc.common.systemManage.dto.DeviceCriteria;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @author: jiangwang
 * @created: 2023/10/31 13:37
 */
@Component
@FeignClient(value = ServiceId.SYSTEM_MANAGE)
public interface DeviceFeignClient {

    /**
     * 根据条件查询设备及设备扩展属性，属性扁平填入
     *
     * @param deviceCriteria
     * @return
     */
    @RequestMapping(value = "/device/getDeviceWithPropertyByCondition", method = RequestMethod.POST)
    ResultBean<List<DeviceWithProperty>> getDeviceWithPropertyByCondition(@RequestBody DeviceCriteria deviceCriteria);
}
